﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Data.SqlClient;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace WindowsFormsApp1
{
    public partial class Form2 : Form
    {
        public Form2()
        {
            InitializeComponent();
        }

        //确认提交
        private void button1_Click(object sender, EventArgs e)
        {
            string insertuid =  textBox1.Text;
            string inserpwd = textBox2.Text;
            string repwd = textBox3.Text;
            bool bools = inserpwd == repwd;
            bool bol = insertuid != null;
            
            
            
          


            if (!bol)
            {
                MessageBox.Show("请输入账号！");
            }
            if (insertuid==null)
            {
                MessageBox.Show("请输入密码");     
            }




            if (bools && bol)
            {
                Form1 form1 = new Form1();
                Form1.users.Add(insertuid, repwd);
               
                MessageBox.Show("注册成功");
                this.Close();

            }


        }


        //取消
        private void button2_Click(object sender, EventArgs e)
        {
            this.Close();
        }

        private void splitContainer1_Panel2_Paint(object sender, PaintEventArgs e)
        {

        }




    }
}
